<div class="reeF-create">
  <form nz-form [nzLayout]="'inline'" (ngSubmit)="_submitForm()" [formGroup]="validateForm" id="create-device">

    <div nz-form-item style="width:100%;margin-right:30px;">
      <div nz-form-label>
        <label for="deviceType" nz-form-item-required>设备类型</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('deviceType')">
        <nz-select  (ngModelChange)="changeType()"  style="width: 200px;" formControlName="deviceType">
          <nz-option *ngFor="let option of searchOptions" [nzLabel]="option.label" [nzValue]="option.value">
          </nz-option>
        </nz-select>
      </div>
    </div>

    <div nz-form-item style="margin-right:30px;">
      <div nz-form-label>
        <label for="brand" nz-form-item-required>品牌名称</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('brand')">
        <nz-input style="width:200px;" formControlName="brand" [nzDisabled]="true">
        </nz-input>
      </div>
    </div>

    <div nz-form-item>
      <div nz-form-label style="margin-right:12px;">
        <label for="sid" nz-form-item-required>序列号</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('sid')">
        <nz-input style="width:200px" formControlName="sid">
        </nz-input>
      </div>
    </div>

    <div nz-form-item style="margin-right:30px;">
      <div nz-form-label>
        <label for="model" nz-form-item-required>设备型号</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('model')">
        <nz-input style="width: 200px;" formControlName="model">
        </nz-input>
      </div>
    </div>

    <div nz-form-item>
      <div nz-form-label>
        <label for="dateOfProduct" nz-form-item-required>生产日期</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('dateOfProduct')">
        <nz-datepicker style="width: 200px;" formControlName="dateOfProduct">
        </nz-datepicker>
      </div>
    </div>

    <div nz-form-item style="margin-right:30px;">
      <div nz-form-label>
        <label for="power" nz-form-item-required>设备功率</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('power')">
        <nz-input style="width: 200px;" formControlName="power">
          <ng-template #addOnAfter>KV</ng-template>
        </nz-input>
      </div>
    </div>

    <div nz-form-item>
      <div nz-form-label>
        <label for="voltage" nz-form-item-required>设备电压</label>
      </div>
      <div nz-form-control [nzValidateStatus]="getFormControl('voltage')">
        <nz-input style="width: 200px;" formControlName="voltage">
          <ng-template #addOnAfter>KW</ng-template>
        </nz-input>
      </div>
    </div>

    <form nz-form id="create-device-profile" [nzLayout]="'inline'">
      <ree-form-child nz-form-item [formChild]="formChild" *ngFor="let formChild of formChilds" [form]="profile"></ree-form-child>
    </form>

    <div nz-form-item class="reeF-center-btn">
      <div nz-form-control>
        <button nz-button [nzSize]="'large'">提交</button>
      </div>
    </div>
  </form>
</div>